package com.photography.mapper;

import com.photography.entity.ProductReview;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;

public interface ProductReviewsMapper extends BaseMapper<ProductReview> {
    Double getAverageRating(@Param("productId") Integer productId);
    Integer getReviewCount(@Param("productId") Integer productId);
    List<ProductReview> findByProductId(@Param("productId") Integer productId);
    List<ProductReview> findByUserId(@Param("userId") Integer userId);
}
